fix: redact secrets in DLQ read API (PILOT-314)#29
Conversation
HandleGetWebhookDLQ previously returned event Details verbatim. If the audit-level redaction (redactKey) missed a secret field, the DLQ became a credential-disclosure surface for any caller holding the admin token. - Export RedactMap in audit package (applies same redactKey rules) - Apply audit.RedactMap to DLQ entry details on retrieval - Add tests for RedactMap and DLQ redaction path
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
📊 PR Status — PILOT-314
|
|
🔍 Diff Walkthrough — PILOT-314: Redact secrets in DLQ read API
Why this matters: |
🔍 PR Explanation — #29 PILOT-314What this doesApplies audit-level secret redaction to the DLQ read API ( The problem
The fix1. Exported
2. Applied in
3. Tests (+99 lines across two test files)
Scope
|
📊 PR Status Update — #29 PILOT-314
|
Summary
HandleGetWebhookDLQpreviously returned eventDetailsverbatim. If the audit-level redaction (redactKeyinaudit/audit.go) missed a secret field, the DLQ became a credential-disclosure surface for any caller holding the admin token.Fix
RedactMapin the audit package — applies the sameredactKeyrules to amap[string]interface{}audit.RedactMapto each DLQ entry's Details on retrieval inHandleGetWebhookDLQScope
Verification
go build ./...✅go vet ./...✅go test ./audit/ ./webhook/ -count=1✅ (new tests:TestRedactMap,TestHandleGetWebhookDLQRedactSecrets)Ticket
🔗 PILOT-314